import {print} from 'nc-lightapp-front';
/*
    60072050	调配记录
60072060	兼职记录
60072070	离职记录
    */
export default function templatePrint() {
    const {appcode, table} = this.props;

    const allData = table.getAllTableData('info');
    const param_str = allData.rows.map(item => item.values.pk_psnjob.value);

    let postData = {
        funcode: appcode,     //功能节点编码，即模板编码
        nodekey: appcode,
        oids: param_str   // 单据pk  oids含有多个元素时为批量打印,
    };

    print(
        'pdf',  //支持两类: 'html'为模板打印, 'pdf'为pdf打印
        '/nccloud/hrtrn/pub/RecordsPrintAction.do',
        postData
    );
}
